package testing;
import java.sql.SQLException;
import java.util.Date;
import java.util.Vector;

import junit.framework.TestCase;

import Database.DBActions;
import Database.PlayerPlayedGames;

public class DatabaseTest extends TestCase{
	
	public void testAddGame(){
		Vector<PlayerPlayedGames> v=new Vector<PlayerPlayedGames>();
	    Date date = new Date();
		PlayerPlayedGames p1 = new PlayerPlayedGames(date, "genia", 1, false);
		p1.setUserID(3);
		PlayerPlayedGames p2 = new PlayerPlayedGames(date, "eugene", 1, true);
		p2.setUserID(4);
		v.add(p1);
		v.add(p2);
		try {
			assertEquals(true, DBActions.AddGame(v));
		} catch (SQLException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
}
